package com.htthorizon.model.request;

import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 数据源保存的请求参数信息
 * @author mark
 */
public class ModelSourceReq {

    private Long id;

    /** 数据源名称 */
    @ApiModelProperty(name = "数据源名称")
    @NotNull(message = "数据源名称不能为空")
    private String sourceName;

    @ApiModelProperty(name = "英文表名")
    @NotNull(message = "英文表名不能为空")
    private String sourceTable;

    /** 连接方式-字典表 */
    @ApiModelProperty(name = "连接方式-1API 2JDBC")
    private String linkType;

    /** 账号 */
    @ApiModelProperty(name = "账号")
    private String account;

    /** 密码 */
    @ApiModelProperty(name = "密码")
    private String securityKey;

    /** app code */
    @ApiModelProperty(name = "app code")
    private String requestCode;

    /** 端口 */
    @ApiModelProperty(name = "端口")
    private Long port;
    @NotEmpty(message = "主机地址不能为空")
    private String host;

    /** 请求链接  改为路径 */
    @ApiModelProperty(name = "请求链接")
    @NotNull(message = "请求链接不能为空")
    private String requestUrl;

    /** 请求方法 */
    @ApiModelProperty(name = "请求方法")
    @NotNull(message = "请求方法不能为空")
    private String requestMethod;

    /** 状态:0正常-1已删除 */
    @ApiModelProperty(name = "状态:0正常-1已删除")
    private Integer status;

    /** 描述 */
    @ApiModelProperty(name = "描述")
    private String remark;

    /** 请求参数列表 */
    @ApiModelProperty(name = "请求参数列表")
    private List<ModelSourceParamReq> sourceParams;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRequestCode() {
        return requestCode;
    }

    public void setRequestCode(String requestCode) {
        this.requestCode = requestCode;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getLinkType() {
        return linkType;
    }

    public void setLinkType(String linkType) {
        this.linkType = linkType;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getSecurityKey() {
        return securityKey;
    }

    public void setSecurityKey(String securityKey) {
        this.securityKey = securityKey;
    }

    public Long getPort() {
        return port;
    }

    public void setPort(Long port) {
        this.port = port;
    }

    public String getRequestUrl() {
        return requestUrl;
    }

    public void setRequestUrl(String requestUrl) {
        this.requestUrl = requestUrl;
    }

    public String getRequestMethod() {
        return requestMethod;
    }

    public void setRequestMethod(String requestMethod) {
        this.requestMethod = requestMethod;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<ModelSourceParamReq> getSourceParams() {
        return sourceParams;
    }

    public void setSourceParams(List<ModelSourceParamReq> sourceParams) {
        this.sourceParams = sourceParams;
    }

    public String getSourceTable() {
        return sourceTable;
    }

    public void setSourceTable(String sourceTable) {
        this.sourceTable = sourceTable;
    }
}
